<template>
  <div @click="handlerUpdate">
    更新数据
  </div>
  
  <router-link to="/loading">测试数据{{age}}</router-link>
</template>
<script>
import { ref, onRenderTracked, onActivated, onMounted } from 'vue';
export default {
  name: 'onTrigger',
  setup () {
    let age = ref(0);
    onMounted(() => {
        console.log('onMounted')
    })
    onRenderTracked((event) => {
        console.log(event, 'event========>')
    })
    onActivated(() => {
        console.log('111111')
    })
    const handlerUpdate = () => {
        age.value = 1;
    }
    return {
        age,
        handlerUpdate
    };
  },
}
</script>
<style scoped>

</style>